package com.gsoe.auth.controller;

import com.gsoe.auth.service.ResourceService;
import com.gsoe.base.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 班级资源表 前端控制器
 * </p>
 *
 * @author xiaoma
 * @since 2024-12-15
 */
@RestController
@RequestMapping("/resource")
public class ResourceController {

    @Autowired
    private ResourceService resourceService;

    @PostMapping("/uploadAvatar")
    public Result<String> uploadAvatar(@RequestParam("file") MultipartFile file) {

        return Result.success(resourceService.uploadAvatar(file));
    }
}
